matploblib fonts
Print available fonts
import matplotlib as mpl
font_paths = mpl.font_manager.findSystemFonts()
font_objects = mpl.font_manager.createFontList(font_paths)
font_names = [f.name for f in font_objects]
print(font_names)

Japanese
import matplotlib
plt.rcParams["svg.fonttype"] = "none"
plt.savefig("foo.svg")

Math

Custom fonts

Tips